<template>
  <div>若兮管理员列表
    <el-button @click="testAuth">鉴权</el-button>
    <div>{{message}}</div>
  </div>
</template>

<script>
	export default {
		name: "index",
    data(){
			return{
				message: ''
      }
    },
    methods:{
			testAuth() {
				var vm = this
				this.axios({
					method: 'GET',
					url: 'http://localhost:8084/testConfig',
					headers: {
						'access_token': '9bc72f52-8d82-4eb2-83b7-c7852e708393'
					},
					params: { 'access_token': '9bc72f52-8d82-4eb2-83b7-c7852e708393'}
				}).then(async function(resp) {
					alert(resp.data)
					if (resp.status === 401){
						vm.$message({
							message: '鉴权失败!',
							type: 'error',
							center: true
						});
					} else {
						vm.$message({
							message: '鉴权成功!',
							type: 'success',
							center: true
						});
						vm.message = resp.data
					}
				})
			},
    }
	}
</script>

<style scoped>

</style>
